-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[script] refactor bootstrap
and make-raspbian.bash
#67
[script] refactor bootstrap
and make-raspbian.bash
#67
Conversation
bootstrap
and make-raspbian.bash
c5f54e2
to
c23d70c
Compare
This is necessary for environments which block public DNS, such as in some corporate networks. The host-machine's DNS configuration is not included in the output raspios image.
3381a5a
to
48cfce8
Compare
|
||
# Mount /etc/resolv.conf | ||
if [ -f "/etc/resolv.conf" ]; then | ||
sudo mount -o ro,bind /etc/resolv.conf "$QEMU_ROOT"/etc/resolv.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary for environments which block public DNS, such as in some corporate networks.
The host-machine's DNS configuration is not included in the output raspios image. Instead, the original /etc/resolv.conf
from the raspios .img will be present in the output image
7ff3e71
to
48cfce8
Compare
fd86d19
to
a22b3ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e562796
to
2f31c9e
Compare
- Rename `repo_dir` to `OT_REFERENCE_RELEASE` - Move raspios download into `make-raspbian.bash` instead of `bootstrap.bash` - Add support for x-zipped raspios images - Use DOCKER env var from host machine when running `script/otbr-setup.bash` in QEMU machine
`script/otbr-setup.bash` should fail and exit if there's a problem running `script/setup`
2f31c9e
to
33bc086
Compare
@jwhui please review when you get a chance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍🏼
script/bootstrap.bash
I think the bootstrap script was originally taken from https://github.com/openthread/ot-br-posix/blob/main/tests/scripts/bootstrap.sh.
Most of the script isn't required since the OTBR build occurs in the mounted Raspberry Pi OS
chroot
, not the host machine. Within the Raspberry Pi OSchroot
, the OTBR requirements are already being installed inscript/otbr-setup.bash
This PR removes most of the unnecessary packages and also makes the bootstrap script more flexible, allowing smaller portions of the script to be run via command line arguments
Also, the download of RaspiOS has been moved to
script/make-raspbian.bash
script/make-raspbian.bash
cleanup()
has been refactored$QEMU_ROOT
are killed before unmounting/etc/resolv.conf
is mounted from the host into$QEMU_ROOT
./etc/resolv.conf
from the raspios .img will be present in the output image